package cn.lovemmd.model.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.lovemmd.model.admin.entity.Code;
import cn.lovemmd.model.admin.mapper.CodeMapper;
import cn.lovemmd.model.admin.service.CodeService;
import org.springframework.stereotype.Service;

@Service
public class CodeServiceImpl extends ServiceImpl<CodeMapper, Code> implements CodeService {
    @Override
    public boolean addCode(String cCode) {
        Code code = new Code();
        code.setCCode(cCode);
        code.setCStatus(0);
        return this.save(code);
    }

    @Override
    public boolean deleteCode(Long cId) {
        return this.removeById(cId);
    }
}
